
<!DOCTYPE html>
<html>
<head lang="en">
	<meta charset="UTF-8">
<title>课后习题3</title>
	<link rel="stylesheet" href="../css/a.css">

</head>

<body>
<div class="scroll">
	<div id="num">
		<a href="#" onclick="d0()">1</a>
		<a href="#" onclick="d1()">2</a>
		<a href="#" onclick="d2()">3</a>
		<a href="#" onclick="d3()">4</a>
		<a href="#" onclick="d4()">5</a>
	</div>
	<img src="../img/1.gif" alt="图片" id="photo"/>
</div>
<script type="text/javascript">
	

	var i=document.getElementById("photo");
	function d0(){
	
		i.setAttribute("src","../img/1.gif");

	}
	function d1(){
	
		i.setAttribute("src","../img/2.gif");

	}
	function d2(){	
		i.setAttribute("src","../img/3.gif");

	}
	function d3(){
		
		i.setAttribute("src","../img/4.gif");

	}
	function d4(){
		
		i.setAttribute("src","../img/5.gif");

	}
</script>
</body>
</html>
